﻿using Newtonsoft.Json;

namespace Hpt.Device.Sample.Dto;

public class TradeSumResponse : DeviceResponseBaseV1
{
    /// <summary>
    /// 消费总金额
    /// </summary>
    [JsonIgnore]
    public decimal Amount { get; set; }

    [JsonProperty(NullValueHandling = NullValueHandling.Include, PropertyName = "Money", Order = 2)]
    public string Money => Amount.ToString("N2");

    [JsonProperty(NullValueHandling = NullValueHandling.Include, PropertyName = "Count", Order = 3)]
    public string Sum => Count.ToString();

    /// <summary>
    /// 消费总笔数
    /// </summary>
    [JsonIgnore]
    public int Count { get; set; }

    [JsonProperty(NullValueHandling = NullValueHandling.Include, Order = 4)]
    public string Times => Timers.ToString();

    /// <summary>
    /// 计次消费总次数
    /// </summary>
    [JsonIgnore]
    public int Timers { get; set; }
}